import { UUIDUtils } from 'src/app/utils/uuid-utils';

export class LineEditFormCache {

    id: string;
    status: 'new'|'updated';
    record: any;

    static create(param: {
        id?: string,
        status?: 'new'|'updated',
        record?: any
    }): LineEditFormCache {
        const {id, status, record} = param;
        const cache = new LineEditFormCache();
        cache.id = !!id ? id : UUIDUtils.uuid();
        cache.status = !!status ? status : 'new';
        cache.record = !!record ? record : {};
        return cache;
    }


}

